package com.ibeeking.found.id.mybatisplus;

import com.ibeeking.found.id.GenerateId;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import org.springframework.stereotype.Component;

/**
 * @ClassName IdGeneratorConfig
 * @Description Mybatis-Plus的id自动添加生成配置
 * @Author ibeeking
 * @Date 2020-11-26 17:54
 **/
@Component
public class IdGeneratorConfig implements IdentifierGenerator {

    @Override
    public Long nextId(Object entity) {
        return GenerateId.generateId();
    }
}
